package classes.Commands
{
	import components.editor.c_baseElement;
	import components.editor.c_textElement;
	
	public class c_applyTextParams extends c_baseCommand {
		private var _newParams: Object;
		private var _prevParams: Object;
		public function c_applyTextParams(a_element: c_textElement, a_newParams: Object, a_prevParams: Object) {
			super(a_element);
			_prevParams = a_prevParams;
			_newParams = a_newParams;
		}
		
		protected function get textElement(): c_textElement {
			return element as c_textElement;
		}
		
		override public function Execute():void {
			textElement.applyTextFormat(null, _newParams);
		}
		
		override public function unExecute():void {
			textElement.applyTextFormat(null, _prevParams);
		}		
	}
}